﻿/**
 * 
 * @file FITKAcousticsNCTLayUp.h
 * @brief 多层声学包定义
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-10-21
 * 
 */
#ifndef _FITK_ACOUSTICS_NCT_LAY_UP__H___
#define _FITK_ACOUSTICS_NCT_LAY_UP__H___

#include "FITKAcousticsAbsNCT.h"
#include "FITKAcousticsPhysicsAPI.h"

namespace Acoustics
{
    /**
     * @brief 多层声学包层定义，抽象类
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-10-21
     */
    class FITKAcousticsPhysicsAPI FITKAcousticsNCTAbstractLayObj : public Core::FITKAbstractNDataObject
    {
        Q_OBJECT
    public:
        /**
         * @brief 层类型定义
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        enum NCTLayUpType
        {
            None = 0,    ///< 空
            Foam,        ///< 泡沫
            Fiber,       ///< 纤维
            Gap,         ///< 缝隙
            Panel,       ///< 实体板
            Septum,      ///< 隔离层
            Perforated,  ///< 多孔介质
            Resistive,   ///< 阻尼
        };

    public:
        /**
         * @brief Construct a new FITKAcousticsNCTAbstractLayObj object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        explicit FITKAcousticsNCTAbstractLayObj() = default;
        /**
         * @brief Destroy the FITKAcousticsNCTAbstractLayObj object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        virtual ~FITKAcousticsNCTAbstractLayObj() = 0;
        /**
         * @brief 获取层类型
         * @return NCTLayUpType 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        virtual NCTLayUpType getNCTLayUpType() = 0;
        /**
         * @brief 单位面积的质量
         * @return double 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        virtual double getMassPerUnitArea() = 0;
        /**
         * @brief 设置厚度
         * @param[i]  t              厚度
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        void setThickness( const double& t);
        /**
         * @brief 获取厚度
         * @return double 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        double getThickness() const;

        /**
       * @brief 复制数据对象,深拷贝，数据id不拷贝
       * @param[i] obj 被拷贝的对象
       * @return true
       * @return false
       * @author liuzhiyuan@diso.cn@diso.com
       * @date 2024-11-10
       */
        virtual bool copy(FITKAbstractDataObject* obj) override;

    private:
        /**
         * @brief 厚度
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        double _thickness{ 0.0 };
    };

    /**
     * @brief 多层声学包定义
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-10-21
     */
    class FITKAcousticsPhysicsAPI FITKAcousticsNCTLayUp : public FITKAcousticsAbsNCT,
         public Core::FITKAbstractDataManager<FITKAcousticsNCTAbstractLayObj>
    {
        FITKCLASS(Acoustics, FITKAcousticsNCTLayUp);
        Q_OBJECT
    public:
        /**
         * @brief Construct a new FITKAcousticsNCTLayUp object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        explicit FITKAcousticsNCTLayUp() = default;
        /**
         * @brief Destroy the FITKAcousticsNCTLayUp object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        virtual ~FITKAcousticsNCTLayUp() = default;
        /**
         * @brief 获取层类型
         * @return FITKAcousticsAbsNCT::NCTType 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        virtual FITKAcousticsAbsNCT::NCTType getNCTType() override;
        /**
         * @brief 获取层数
         * @return int 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        int getLayCount();
         /**
         * @brief 单位面积的质量
         * @return double 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        double getMassPerUnitArea();
        /**
         * @brief 获取厚度
         * @return double 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-21
         */
        double getTotalThickness();

        /**
         * @brief 获取最大仰角
         * @return double
         * @author liuzhiyuan@diso.cn@diso.com
         * @date 2024-10-21
         */
        double getMaxFieldAngle();
        /**
         * @brief 设置最大仰角
         * @param[i] maxfieldangle 最大仰角
         * @author liuzhiyuan@diso.cn@diso.com
         * @date 2024-09-29
         */
        void setMaxFieldAngle(double maxfieldangle);

    private:
        /**
         * @brief  最大仰角
         * @author liuzhiyuan(liuzhiyuan@diso.cn)
         * @date   2024-09-29
         */
        double _maxFieldAngle {0.0};

    };


}


#endif
